﻿using System;
using System.Collections.Generic;
using Ornament.Util.Domain;

namespace JinTai.MemorialTablets
{
    /// <summary>
    /// 法事(提示)
    /// </summary>
    [Serializable]
    public class Affair : DomainObject<Guid>
    {
        /// <summary>
        /// 内容
        /// </summary>
        public virtual string Content { get; set; }

        /// <summary>
        /// 类型(准备写成配置文件)
        /// </summary>
        public virtual string Type { get; set; }

        /// <summary>
        /// 价格(准备写成配置文件)
        /// </summary>
        public virtual double Price { get; set; }

        /// <summary>
        /// 所属牌位信息
        /// </summary>
        public virtual MemorialTablet MemorialTablet { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public virtual DateTime ActionTime { get; set; }

        /// <summary>
        /// 期周类型
        /// </summary>
        public virtual CycleType CycleType { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public virtual string Memo { get; set; }

        /// <summary>
        /// 联系人信息,
        /// </summary>
        /// <remarks>
        /// 一个牌位有多个联系人
        /// </remarks>
        public virtual IList<Contact> Contacts { get; set; }

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        protected override int CreateHashCode()
        {
            return (Id).GetHashCode()*21;
        }
    }
}